﻿capital = 500


oob = "tabrasa_1936BRA"


# Starting tech
set_technology = {
	infantry_weapons = 1
	gw_artillery = 1
	interwar_antiair = 1
	interwar_antitank = 1
	basic_train = 1
	motorised_infantry = 1
	tech_support = 1
	basic_train = 1
	tech_trucks = 1 
}
add_equipment_to_stockpile = { type = train_equipment_1 amount = 75 producer = GER }


if = {
	limit = { has_dlc = "By Blood Alone" }
		set_technology = {
			aa_lmg = 1
			engines_1 = 1
			early_bombs = 1
			aircraft_construction = 1
			iw_small_airframe = 1
			iw_medium_airframe = 1
		}
	create_equipment_variant = {
		name = "He 51" #also covers Ar 68
		type = small_plane_airframe_0
		modules = {
			fixed_main_weapon_slot = light_mg_2x
			engine_type_slot = engine_1_1x
			special_type_slot_1 = empty
		}
	}
	create_equipment_variant = {
		name = "Ju 86"
		type = medium_plane_airframe_0
		modules = {
			fixed_main_weapon_slot = medium_bomb_bay
			fixed_auxiliary_weapon_slot_1 = empty
			fixed_auxiliary_weapon_slot_2 = empty
			fixed_auxiliary_weapon_slot_3 = empty
			engine_type_slot = engine_1_2x
			special_type_slot_1 = lmg_defense_turret
			special_type_slot_2 = lmg_defense_turret
			special_type_slot_3 = empty
			special_type_slot_4 = empty
		}
	}	
	else = {
		set_technology = {
			early_fighter = 1
			early_bomber = 1
		}
	}
}	

if = {
	limit = {
		NOT = { has_dlc = "No Step Back" }
	}
	set_technology = { 
		gwtank = 1
	}
}

if = {
	limit = {
		has_dlc = "No Step Back"
	}
	set_technology = { 
		gwtank_chassis = 1
		
	}
}



if = {
	limit = {
		has_dlc = "Man the Guns"
	}
	set_technology = {
		basic_naval_mines = 1
		early_ship_hull_light = 1
		early_ship_hull_cruiser = 1
		basic_battery = 1
		basic_dp_light_battery = 1
		basic_torpedo = 1
		coastal_defense_ships = 1
	}
}
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_destroyer = 1
		early_light_cruiser = 1
	}
}

if = {
	limit = { has_dlc = "Man the Guns" }
	# Destroyers #
	create_equipment_variant = {
		name = "Para Class"
		type = ship_hull_light_1
		name_group = BRA_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = dp_light_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_1
			fixed_ship_torpedo_slot = ship_torpedo_1
			mid_1_custom_slot = empty
			rear_1_custom_slot = empty
		}
	}
	# Light Cruisers #
	create_equipment_variant = {
		name = "Bahia Class"
		type = ship_hull_cruiser_1
		name_group = BRA_CL_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_medium_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_1
			fixed_ship_armor_slot = ship_armor_cruiser_1
			fixed_ship_secondaries_slot = dp_ship_secondaries_1
			mid_1_custom_slot = ship_torpedo_1
			mid_2_custom_slot = empty
			rear_1_custom_slot = ship_airplane_launcher_1
		}
	}
	# Costal Defense #
	create_equipment_variant = {
		name = "Minas Class"
		type = ship_hull_cruiser_coastal_defense_ship
		name_group = BRA_CA_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_heavy_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_1
			fixed_ship_armor_slot = ship_armor_cruiser_1
			fixed_ship_secondaries_slot = dp_ship_secondaries_1
			mid_1_custom_slot = dp_ship_secondaries_1
			mid_2_custom_slot = empty
			rear_1_custom_slot = empty
		}
	}
}





if = {
	limit = {
		has_dlc = "La Resistance"
	}
	set_technology = {
		armored_car1 = 1
	}
}

set_convoys = 75
set_research_slots = 4
add_political_power = 2000
add_manpower = 50000
add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 10000 }


set_popularities = {
	democratic = 25
	fascism = 25
	communism = 25
	neutrality = 25
}

set_politics = {
	ruling_party = neutrality
	last_election = "1936.1.1"
	election_frequency = 72
	elections_allowed = yes
}
####################################TOA###########

every_core_state = {
	ROOT = {
		add_to_array = { cores_at_game_start = PREV }
	}
}

recruit_character = BRA_getulio_vargas
###############################################################################
# ToA
###############################################################################
IF = {
	limit = {
		has_dlc = "Trial of Allegiance"
	}
	set_country_flag = BRA_toa_DLC


	add_ideas = {
		SMB_MTG_naval_arms_race_legacy
	}

	add_ideas = BRA_separatism_idea

	every_owned_state = {
		limit = {
			OR = {
				has_state_category = wasteland
				has_state_category = pastoral
				has_state_category = rural
				#TODO_JUNO: Check states below are correct after map changes implemented
				state = 498
				state = 499
			}
			NOT = {
				state = 961
				state = 962
				state = 963
				state = 964
				state = 965
				state = 966
				state = 967
				state = 968
				state = 496
			}
		}

		# Neglected State Modifier
		set_variable = { BRA_state_development_production_speed = -0.4 }
		set_variable = { BRA_state_development_local_building_slots_factor = -0.4 }
		set_variable = { BRA_state_development_local_factories = -0.4 }
		set_variable = { BRA_state_development_state_resources_factor = -0.4 }

		add_dynamic_modifier = {
			modifier = BRA_neglected_state_dynamic_modifier
		}
	}

	every_owned_state = {
		limit = {
			OR = {
				state = 498
				state = 499
				state = 935
				state = 936
				state = 937
			}
		}
		add_dynamic_modifier = {
			modifier = BRA_cangaceiro_state
		}
	}

	JUNO_set_shared_military_branch_defaults = yes

	# Undiversified Economy Modifier
	set_variable = { BRA_economy_production_efficiency_gain_factor = -0.2 }
	set_variable = { BRA_economy_production_max_efficiency_factor = -0.2 }
	set_variable = { BRA_economy_industrial_capacity_factor = -0.2 }
	
	set_variable = { BRA_weak_government_stability_factor = -0.15 }
	set_variable = { BRA_weak_government_pp_factor = -0.2 }
	set_variable = { BRA_weak_government_neutrality_factor = 0.02 }
	set_variable = { BRA_weak_government_command_power_factor = -0.4}

	set_variable = { BRA_coup_stability_factor = -0.05 }
	set_variable = { BRA_coup_communism_factor = 0.05 }
	set_variable = { BRA_coup_democratic_factor = 0 }
	set_variable = { BRA_coup_fascism_factor = 0 }
	set_variable = { BRA_coup_neutrality_factor = 0 }

	# Estado Novo Modifier
	set_variable = { BRA_estado_novo_stability_factor = 0.1 }
	set_variable = { BRA_estado_novo_fascism_factor = 0 }
	set_variable = { BRA_estado_novo_communism_factor = 0 }
	set_variable = { BRA_estado_novo_democratic_factor = 0 }
	set_variable = { BRA_estado_novo_fascism_factor = 0 }
	set_variable = { BRA_estado_novo_neutrality_factor = 0.2 }
	set_variable = { BRA_estado_novo_production_speed_buildings_factor = 0 }
	set_variable = { BRA_estado_novo_war_support_factor = 0 }
	set_variable = { BRA_estado_novo_recruitable_population_factor = 0 }
	set_variable = { BRA_estado_novo_consumer_goods_factor = 0 }
	set_variable = { BRA_estado_novo_political_power_factor = 0 }
	set_variable = { BRA_estado_novo_production_factory_max_efficiency_factor = 0 }
	set_variable = { BRA_estado_novo_industrial_capacity_factory = 0 }
	set_variable = { BRA_estado_novo_industrial_capacity_dockyard = 0 }
	set_variable = { BRA_estado_novo_production_speed_arms_factory_factor = 0 }
	set_variable = { BRA_estado_novo_production_speed_dockyard_factor = 0 }
	set_variable = { BRA_estado_novo_production_speed_industrial_complex_factor = 0 }

	# Estado Moderno Modifier
	set_variable = { BRA_estado_moderno_stability_factor = 0 }
	set_variable = { BRA_estado_moderno_neutrality_factor = 0 }
	set_variable = { BRA_estado_moderno_communism_factor = 0 }
	set_variable = { BRA_estado_moderno_democratic_factor = 0 }
	set_variable = { BRA_estado_moderno_fascism_factor = 0.2 }
	set_variable = { BRA_estado_moderno_production_speed_buildings_factor = 0 }
	set_variable = { BRA_estado_moderno_war_support_factor = 0 }
	set_variable = { BRA_estado_moderno_recruitable_population_factor = 0 }
	set_variable = { BRA_estado_moderno_consumer_goods_factor = 0 }
	set_variable = { BRA_estado_moderno_political_power_factor = 0 }
	set_variable = { BRA_estado_moderno_production_factory_max_efficiency_factor = 0 }
	set_variable = { BRA_estado_moderno_industrial_capacity_factory = 0 }
	set_variable = { BRA_estado_moderno_industrial_capacity_dockyard = 0 }
	set_variable = { BRA_estado_moderno_production_speed_arms_factory_factor = 0 }
	set_variable = { BRA_estado_moderno_production_speed_dockyard_factor = 0 }
	set_variable = { BRA_estado_moderno_production_speed_industrial_complex_factor = 0 }

	add_dynamic_modifier = { modifier = BRA_undiversified_economy_modifier }
	add_dynamic_modifier = { modifier = BRA_weak_government }
	add_dynamic_modifier = { modifier = BRA_aftermath_of_the_coup }


	set_party_name = {
		ideology = neutrality
		name = BRA_military_party
		long_name = BRA_military_party_long
	}

	set_party_name = {
		ideology = democratic
		name = BRA_provisional_government
		long_name = BRA_provisional_government_long
	}

	country_event = {
		id = JUNO_brazil_events.153
		days = 30
		random_days = 15
	}
	#Political
	recruit_character = BRA_armando_de_sales_oliveira
	recruit_character = BRA_domingos_bras
	recruit_character = BRA_jose_linhares
	recruit_character = BRA_benedito_valadres
	recruit_character = BRA_alfred_agache
	recruit_character = BRA_joao_neves_da_fortuna
	recruit_character = BRA_joao_marques_de_reis
	recruit_character = BRA_francisco_campos
	recruit_character = BRA_filinto_muller
	recruit_character = BRA_indigenous_council
	recruit_character = BRA_lindolfo_collor
	recruit_character = BRA_jose_americo_de_almeida
	recruit_character = BRA_anisio_teixeira
	recruit_character = BRA_integralist_militia_general
	recruit_character = BRA_pedro_henrique
	recruit_character = BRA_pedro_de_alcantara
	recruit_character = BRA_alianca_nacional_libertadora_council
	recruit_character = BRA_minervino_de_oliveira
	recruit_character = BRA_olga_benario_prestes
	recruit_character = BRA_apolonio_de_carvalho
	recruit_character = BRA_war_industrialist
	recruit_character = BRA_captain_of_industry
	recruit_character = BRA_leoncio_basbaum
	recruit_character = BRA_geremia_lunarelli
	recruit_character = BRA_henry_ford
	recruit_character = BRA_gustavo_barroso
	recruit_character = BRA_miguel_reale
	recruit_character = BRA_oliveria_viana
	#Army
	recruit_character = BRA_augusto_fragoso
	recruit_character = BRA_alvaro_de_castro
	recruit_character = BRA_gois_monterio
	recruit_character = BRA_euclides_zenobio_da_costa
	recruit_character = BRA_jose_pessoa_cavalcanti_de_albuquerque
	recruit_character = BRA_henrique_teixeira_lott
	recruit_character = BRA_pereira_de_oliveira
	recruit_character = BRA_eduardo_guedes
	recruit_character = BRA_cristovao_de_castro
	recruit_character = BRA_milton_de_freitas
	recruit_character = BRA_candido_mariano
	recruit_character = BRA_olympio_falconiere_da_cunha
	recruit_character = BRA_floriano_de_lima_brayner
	#Navy
	recruit_character = BRA_henrique_aristides_guilhem
	recruit_character = BRA_silvio_de_noronha
	recruit_character = BRA_protogenes_guimaraes
	recruit_character = BRA_renato_de_almeida_guillobel
	recruit_character = BRA_alvaro_alberto_da_motta_e_silva
	#Cangaco
	recruit_character = BRA_lampiao

}
IF = {
	limit = {
		NOT = {
			has_dlc = "Trial of Allegiance"
		}
	}
	set_politics = {
		ruling_party = democratic
		last_election = "1934.7.17"
		election_frequency = 48
		elections_allowed = yes
	}
	set_popularities = {
		democratic = 50
		neutrality = 25
		fascism = 15
		communism = 10
	}
}
###############################################################################


set_country_flag = monroe_doctrine
recruit_character = BRA_plinio_salgado
recruit_character = BRA_luis_carlos_prestes
#recruit_character = BRA_armando_sales
recruit_character = BRA_eurico_gaspar_dutra
recruit_character = BRA_mascarenhas_de_morais
recruit_character = BRA_augusto_rademaker
recruit_character = BRA_agliberto_vieira
recruit_character = BRA_eduardo_gomes
recruit_character = BRA_salgado_filho
recruit_character = BRA_floriano_peixoto
#recruit_character = BRA_aristides_guilhem
#recruit_character = BRA_joao_neves_da_fontoura
recruit_character = BRA_epaminondas_dos_santos
recruit_character = BRA_moreira_lima
recruit_character = BRA_nero_fiuza_de_castro
recruit_character = BRA_artur_da_costa_e_silva
recruit_character = BRA_ismael_motta_paes
recruit_character = BRA_jorge_martins
recruit_character = BRA_newton_cavalcanti
recruit_character = BRA_afranio_de_mello_franco
recruit_character = BRA_washington_luis_pereira
recruit_character = BRA_osvaldo_aranha
recruit_character = BRA_arlindo_veiga_dos_santos
recruit_character = BRA_random_army_chief

1939.1.1 = {

	add_political_power = 1198
	add_command_power = 100
	
	#Setting up which focuses are to be coplete upon start
	IF = {
		limit = {
			has_dlc = "Trial of Allegiance"
		}

		complete_national_focus = BRA_tribunal_de_seguranca_nacional
		complete_national_focus = BRA_coffee_crisis_aftermath
		complete_national_focus = BRA_ensure_continued_military_support #35
		complete_national_focus = BRA_work_with_the_integralists #35
		complete_national_focus = SMB_army #35
		complete_national_focus = SMB_navy #35
		complete_national_focus = BRA_desenvolvimentismo
		complete_national_focus = BRA_cohen_plan
		complete_national_focus = BRA_estado_novo #35
		complete_national_focus = BRA_promote_resource_extraction
		complete_national_focus = BRA_the_polaca
		complete_national_focus = BRA_stimulate_the_civilian_economy
		complete_national_focus = BRA_radio_nacional
		complete_national_focus = BRA_deal_with_the_cangaceiro
		complete_national_focus = BRA_establish_psad
		complete_national_focus = BRA_autarky 
		complete_national_focus = BRA_departamendo_de_propaganda
		complete_national_focus = BRA_tech_slot_1

		ELSE = {
			#generic focuses
			complete_national_focus = army_effort
			complete_national_focus = equipment_effort
			complete_national_focus = motorization_effort
			complete_national_focus = aviation_effort
			complete_national_focus = naval_effort
			complete_national_focus = large_navy
			complete_national_focus = industrial_effort
			complete_national_focus = construction_effort
			complete_national_focus = production_effort
		}
	}
}




